package serviceset1.feign

import feign.Param
import feign.RequestLine
import org.springframework.cloud.openfeign.FeignClient
import org.springframework.web.bind.annotation.PathVariable
import org.springframework.web.bind.annotation.RequestMapping
import org.springframework.web.bind.annotation.RequestMethod

@FeignClient(name = "SERVICE-SET-2", fallback = ServiceSet2HystrixService.class)
interface ServiceSet2 {
    @RequestLine("GET /sampleApi2?dependency={dependency}")//work for testing
    @RequestMapping(method = RequestMethod.GET, value = "/sampleApi2?dependency={dependency}")//work for service discovery
    Map sampleApi2(
            @PathVariable("dependency")
            @Param("dependency") //work for testing
            String dependency
    )
}